package jdmx.framework.ui;

import jdmx.framework.common.interfaces.Proxy;

public class ProxyFactory {
	public static Proxy create(String proxyType) {
		Proxy proxy = null;
		if (proxyType.equalsIgnoreCase(ProxyConst.PXY_LOCAL)) {
			proxy = new ProxyLocal();
		} else if (proxyType.equalsIgnoreCase(ProxyConst.PXY_LOCAL_SERIALIZED)){
			proxy = new ProxyLocalSerialized();
		} else if (proxyType.equalsIgnoreCase(ProxyConst.PXY_WS)) {
			proxy = new ProxyWs();
		}
		if (proxy != null) {
			proxy.init(); 
		}
		return proxy;
	}
}
